package com.lck.blogmanager.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * @author wyq
 * @version v1.0.0
 * @explain
 * @date 2024/4/7 11:17
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
@TableName("audit")
public class AuditEntity {

    /**
     * id
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    /**
     * 审核类型 1博客 2问答
     */
    private Integer type;

    /**
     * 关联id
     */
    private Integer relationId;

    /**
     * 审核结果 1通过 2不通过
     */
    private Integer result;

    /**
     * 原因
     */
    private String message;

    /**
     * 审核时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

}
